using UnityEngine;
using System.Collections;

public class reload : MonoBehaviour {
	public GameObject acamera;
	bool onTheRun = false;
	public Vector3 whereto;
	// Use this for initialization
	void Start () 
	{
		MenuManager.camera = acamera;
	}
	
	// Update is called once per frame
	void Update () 
	{
		if (onTheRun)
		{
			MenuManager.MoveCamera(whereto);
			if(Mathf.Approximately(acamera.transform.position.x ,whereto.x))
			{
				onTheRun = false;
			}
		}
	}
	void OnMouseDown()
	{
		onTheRun = true;
	}
}
